Unlike the function as.numeric()
from the base
package, the function asNumeric()
coerces to numeric without a warning if
any values are not numeric. All such values are considered NA missing.
The function possibleNumeric()
tests if the values in a vector are possibly
numeric, irrespective of their storing as character or numbers.
Function wholeNumeric()
tests if numbers in a vector are whole (round) numbers.
Whole numbers are different from “integer” numbers (which have special memory
representation), and consequently the function is.integer()
tests
something different, how numbers are stored in memory (see the description of function
double()
for more details).